<div id="submenu">
    <ul>
        <?php
        if (isset($submenu) && $submenu === 'groupe') {
            ?>
            <li><a href="users.html" title="">Utilisateurs</a></li>
            <li><a href="users-groupe.html" title="" class="active">Groupes</a></li>
            <?php
        } else {
            ?>
            <li><a href="users.html" title="" class="active">Utilisateurs</a></li>
            <li><a href="users-groupe.html" title="">Groupes</a></li>
            <?php
        }
        ?>
    </ul>
    <div class="clear"></div>
</div>



<?php
if (isset($submenu) && $submenu === 'groupe') {
    ?>
<div id="content">
        <h3><span class="title">Liste des groupes</span><span class="underlined">&nbsp;</span></h3>
        <a class="add" href="#" title="">Ajouter un groupe</a>
        <div class="tablebox">
            <table>
                <thead>
                    <tr>
                        <th>Nom</th>
                        <th>Propriétaire</th>
                        <th class="action">Action</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $i = 0;
                    foreach ($listeGroups as $Group) {
                        ?>
                        <tr>
                            <td><?php echo $Group['name']; ?></td>
                            <td><?php echo $Group['groupowner']; ?></td>
                            <td class="action"><a href='deleteUser-<?php echo $User['email']; ?>.html' title=""><img src="../img/icons/trash_on.gif" alt="Supprimer" title="Supprimer" /></a></td>
                        </tr>
                        <?php
                        $i++;
                    }
                    ?>
                </tbody>
            </table>
        </div>
    </div>
    <?php
} else {
    ?>
    <!-- block example table -->
    <div id="content">
        <h3><span class="title">Liste des utilisateurs</span><span class="underlined">&nbsp;</span></h3>
        <div class="tablebox">
            <table>
                <thead>
                    <tr>
                        <th>Name</th>
                        <th>Email</th>
                        <th>Date d'enregistrement</th>
                        <th>Compte actif</th>
                        <th>Clé d'activation</th>
                        <th class="action">Action</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $i = 0;
                    foreach ($listeUsers as $User) {
                        ?>
                        <tr>
                            <td><?php echo $User['name']; ?></td>
                            <td><?php echo $User['email']; ?></td>
                            <td><?php echo $User['registration_date']; ?></td>
                            <td><?php echo $User['active_account']; ?></td>
                            <td><?php echo $User['activation_key']; ?></td>
                            <td class="action"><a href='deleteUser-<?php echo $User['email']; ?>.html' title=""><img src="../img/icons/trash_on.gif" alt="Supprimer" title="Supprimer" /></a></td>
                        </tr>
                        <?php
                        $i++;
                    }
                    ?>
                </tbody>
            </table>
        </div>
    </div>
    <?php
}
?>
